home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / SNNSV32.ZIP / SNNSv3.2 / xgui / sources / bn_art1.ph < prev    next >
Encoding:
Text File  |  1994-04-25  |  3.8 KB  |  125 lines

  1. /*****************************************************************************
  2.   FILE           : bn_art1.ph
  3.   SHORTNAME      : bn_art1
  4.   SNNS VERSION   : 3.2
  5.  
  6.   PURPOSE        : 
  7.   NOTES          :
  8.  
  9.   AUTHOR         : Kai-Uwe Herrmann
  10.   DATE           : 15.1.1993
  11.  
  12.   CHANGED BY     : 
  13.   IDENTIFICATION : @(#)bn_art1.ph    1.7 3/2/94
  14.   SCCS VERSION   : 1.7
  15.   LAST CHANGE    : 3/2/94
  16.  
  17.              Copyright (c) 1990-1994  SNNS Group, IPVR, Univ. Stuttgart, FRG
  18.  
  19. ******************************************************************************/
  20. #ifndef _BN_ART1_DEFINED_
  21. #define  _BN_ART1_DEFINED_
  22.  
  23. /* end private definition section */
  24.  
  25. void bn_createART1 (void);
  26.  
  27. /* end private definition section */
  28.  
  29.  
  30. /* begin private definition section */
  31.  
  32. /* Definition of the Output Function */
  33. #define ART1_OUTFUNC    "Out_Identity"
  34.  
  35.  
  36. /* Definition of the Activationfunctions */
  37. #define ART1_ACTF_INP "Act_Identity"
  38. #define ART1_ACTF_CMP "Act_at_least_2"
  39. #define ART1_ACTF_REC "Act_Identity"
  40. #define ART1_ACTF_DEL "Act_at_least_2"
  41. #define ART1_ACTF_D   "Act_at_least_1"
  42. #define ART1_ACTF_RST "Act_at_least_1"
  43. #define ART1_ACTF_G1  "Act_at_least_2"
  44. #define ART1_ACTF_RI  "Act_Product"
  45. #define ART1_ACTF_RC  "Act_Identity"
  46. #define ART1_ACTF_RG  "Act_less_than_0"
  47. #define ART1_ACTF_CL  "Act_at_least_1"
  48. #define ART1_ACTF_NCL "Act_ART1_NC"
  49. #define ART1_ACTF_RHO "Act_Identity"
  50. #define ART1_ACTF_G2  "Act_at_most_0"
  51.  
  52.  
  53. /* Site names
  54. */
  55. #define ART1_SITE_NAME_RST_SELF    "Art1_Site_Rst_Self"
  56. #define ART1_SITE_NAME_RST_SIGNAL  "Art1_Site_Rst_Signal"
  57. #define ART1_SITE_NAME_REC_G1      "Art1_Site_Rec_G1"
  58. #define ART1_SITE_NAME_INP_G1      "Art1_Site_Inp_G1"
  59. #define ART1_SITE_NAME_INP_RI      "Art1_Site_Inp_RI"
  60. #define ART1_SITE_NAME_RHO_RI      "Art1_Site_Rho_RI"
  61.  
  62. /* Site function names
  63. */
  64. #define ART1_SITE_FUNC_RST_SELF    "Site_WeightedSum"
  65. #define ART1_SITE_FUNC_RST_SIGNAL  "Site_at_least_2"
  66. #define ART1_SITE_FUNC_REC_G1      "Site_at_most_0"
  67. #define ART1_SITE_FUNC_INP_G1      "Site_at_least_1"
  68. #define ART1_SITE_FUNC_INP_RI      "Site_WeightedSum"
  69. #define ART1_SITE_FUNC_RHO_RI      "Site_WeightedSum"
  70.  
  71. /* Learning function name */
  72. #define ART1_LEARN_FUNC_NAME     "ART1"
  73.  
  74. /* Update function name */
  75. #define ART1_UPDATE_FUNC_NAME    "ART1_Stable"
  76.  
  77.  
  78.  
  79. /* Macros
  80. */
  81. #define FOR_ALL_ART1_INP_UNITS(x)  for (x = 1; x <= IUnits; x++)
  82. #define FOR_ALL_ART1_CMP_UNITS(x)  for (x = IUnits+1; x <= 2*IUnits; x++)
  83. #define FOR_ALL_ART1_REC_UNITS(x)  for (x = 2*IUnits+1; x <= 2*IUnits + CUnits; x++)
  84. #define FOR_ALL_ART1_DEL_UNITS(x)  for (x = 2*IUnits+CUnits+1; x <= 2*IUnits+2*CUnits; x++)
  85. #define FOR_ALL_ART1_RST_UNITS(x)  for (x = 2*IUnits+2*CUnits+4; x <= 2*IUnits+3*CUnits+3; x++)
  86.  
  87. #define POS_SIGN(x)             (((x) > 0) ? 1 : 0)
  88. #define NO_OF_COLS(units,rows)  ((int) (units/rows) + POS_SIGN(units % rows))
  89. #define F1_COLS(units,rows)     NO_OF_COLS(units, rows)
  90. #define F2_COLS(units,rows)     NO_OF_COLS(units, rows)
  91.  
  92. #define D_UNIT(y)              2*IUnits + 2*CUnits + y
  93.  
  94. #define SPECIAL_UNITS          2*IUnits + 3*CUnits + 4
  95. #define G1_UNIT                SPECIAL_UNITS
  96. #define RI_UNIT                SPECIAL_UNITS + 1
  97. #define RC_UNIT                SPECIAL_UNITS + 2
  98. #define RG_UNIT                SPECIAL_UNITS + 3
  99. #define CL_UNIT                SPECIAL_UNITS + 4
  100. #define NCL_UNIT               SPECIAL_UNITS + 5
  101. #define RHO_UNIT               SPECIAL_UNITS + 6
  102. #define G2_UNIT                SPECIAL_UNITS + 7
  103.  
  104.  
  105. /* checks whether value is not equal to KRERR_NO_ERROR and if so, returns
  106. */
  107. #define CHECK_RETURN(ret_code)  if (ret_code != KRERR_NO_ERROR) \
  108.                                    return (ret_code)
  109.  
  110.  
  111.  
  112.  
  113. static int      bn_art1_open = 0;
  114. static Widget   baseWidget;
  115. static Widget   art1UnitWidget[2], art1RowWidget[2];
  116.  
  117.  
  118. static krui_err bn_art1_createNet (int IUnits, int IRow, int CUnits, int CRos);
  119. static void bn_art1_donePROC (void);
  120. static void bn_art1_createPROC (void);
  121.  
  122. /* end private definition section */
  123.  
  124. #endif
  125.